<!-- HTML header for doxygen 1.8.5-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>MyoKit 0.4.0: TLMHub Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div id="projectnumber">MyoKit &ndash; 0.4.0</div>
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img src="logo-black.png"/></td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('interface_t_l_m_hub.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Properties</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Instance Methods</a> &#124;
<a href="#pub-static-methods">Class Methods</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="class_t_l_m_hub-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">TLMHub Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#import &lt;<a class="el" href="_t_l_m_hub_8h_source.html">TLMHub.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for TLMHub:</div>
<div class="dyncontent">
 <div class="center">
  <img src="interface_t_l_m_hub.png" usemap="#TLMHub_map" alt=""/>
  <map id="TLMHub_map" name="TLMHub_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Instance Methods</h2></td></tr>
<tr class="memitem:a82e3b69a3fcf803d84417f2b8a46ffff"><td class="memItemLeft" align="right" valign="top">(NSArray *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_t_l_m_hub.html#a82e3b69a3fcf803d84417f2b8a46ffff">myoDevices</a></td></tr>
<tr class="separator:a82e3b69a3fcf803d84417f2b8a46ffff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbce958ba26bd0392fae52a2cd09d60b"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_t_l_m_hub.html#acbce958ba26bd0392fae52a2cd09d60b">attachToAdjacent</a></td></tr>
<tr class="separator:acbce958ba26bd0392fae52a2cd09d60b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab26689abf1cafdb5d1b43725e8c161b0"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_t_l_m_hub.html#ab26689abf1cafdb5d1b43725e8c161b0">attachByIdentifier:</a></td></tr>
<tr class="separator:ab26689abf1cafdb5d1b43725e8c161b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad48f9948be7fc01e3250931d20e8de9c"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_t_l_m_hub.html#ad48f9948be7fc01e3250931d20e8de9c">detachFromMyo:</a></td></tr>
<tr class="separator:ad48f9948be7fc01e3250931d20e8de9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Class Methods</h2></td></tr>
<tr class="memitem:a34274c550fa0b5f8d64fbc36df657b1b"><td class="memItemLeft" align="right" valign="top">(instancetype)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_t_l_m_hub.html#a34274c550fa0b5f8d64fbc36df657b1b">sharedHub</a></td></tr>
<tr class="separator:a34274c550fa0b5f8d64fbc36df657b1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr class="memitem:a28258d40419feadc53030e841bfbb06a"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_t_l_m_hub.html#a28258d40419feadc53030e841bfbb06a">TLMLockingPolicy</a> : NSInteger { <a class="el" href="interface_t_l_m_hub.html#a28258d40419feadc53030e841bfbb06aa3079996ed5779d6eac909178816001f8">TLMLockingPolicyStandard</a>, 
<a class="el" href="interface_t_l_m_hub.html#a28258d40419feadc53030e841bfbb06aa30aa751db44b88a2126a28c4b0561349">TLMLockingPolicyNone</a>
 }</td></tr>
<tr class="separator:a28258d40419feadc53030e841bfbb06a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:af5f3c633a027f9aff62b2c96d730be3a"><td class="memItemLeft" align="right" valign="top">NSUInteger&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_t_l_m_hub.html#af5f3c633a027f9aff62b2c96d730be3a">myoConnectionAllowance</a></td></tr>
<tr class="separator:af5f3c633a027f9aff62b2c96d730be3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc3ed0a2a752ac37beafb2720591c64d"><td class="memItemLeft" align="right" valign="top">NSString *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_t_l_m_hub.html#afc3ed0a2a752ac37beafb2720591c64d">applicationIdentifier</a></td></tr>
<tr class="separator:afc3ed0a2a752ac37beafb2720591c64d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05504d8da60de015b64366d1edc738d8"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_t_l_m_hub.html#a05504d8da60de015b64366d1edc738d8">shouldNotifyInBackground</a></td></tr>
<tr class="separator:a05504d8da60de015b64366d1edc738d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c2b081ff4a8c9211c9f26fc58a478df"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_t_l_m_hub.html#a1c2b081ff4a8c9211c9f26fc58a478df">shouldSendUsageData</a></td></tr>
<tr class="separator:a1c2b081ff4a8c9211c9f26fc58a478df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bdc4dd729fb7d12d6625baeb4d2787a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="interface_t_l_m_hub.html#a28258d40419feadc53030e841bfbb06a">TLMLockingPolicy</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_t_l_m_hub.html#a0bdc4dd729fb7d12d6625baeb4d2787a">lockingPolicy</a></td></tr>
<tr class="separator:a0bdc4dd729fb7d12d6625baeb4d2787a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="interface_t_l_m_hub.html">TLMHub</a> singleton manages TLMMyos. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a28258d40419feadc53030e841bfbb06a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">- (enum <a class="el" href="interface_t_l_m_hub.html#a28258d40419feadc53030e841bfbb06a">TLMLockingPolicy</a>) :</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Represents the locking policy for Myos connected to the <a class="el" href="interface_t_l_m_hub.html">TLMHub</a>. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a28258d40419feadc53030e841bfbb06aa3079996ed5779d6eac909178816001f8"></a>TLMLockingPolicyStandard</em>&#160;</td><td class="fielddoc">
<p>Pose events are not sent while a <a class="el" href="interface_t_l_m_myo.html">TLMMyo</a> is locked. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a28258d40419feadc53030e841bfbb06aa30aa751db44b88a2126a28c4b0561349"></a>TLMLockingPolicyNone</em>&#160;</td><td class="fielddoc">
<p>Pose events are always sent. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Method Documentation</h2>
<a class="anchor" id="ab26689abf1cafdb5d1b43725e8c161b0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) attachByIdentifier: </td>
          <td></td>
          <td class="paramtype">(NSUUID *)&#160;</td>
          <td class="paramname"><em>identifier</em></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Searches for the <a class="el" href="interface_t_l_m_myo.html">TLMMyo</a> represented by the identifier, and attaches to it. If the myoConnectionAllowance has been reached when this method is called, nothing happens. If another attaching method has been invoked, nothing happens. </p>

</div>
</div>
<a class="anchor" id="acbce958ba26bd0392fae52a2cd09d60b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) attachToAdjacent </td>
          <td></td>
          <td class="paramname"></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Invoking this method instructs the <a class="el" href="interface_t_l_m_hub.html">TLMHub</a> to wait for a <a class="el" href="interface_t_l_m_myo.html">TLMMyo</a> to touch the iOS device. Once a <a class="el" href="interface_t_l_m_myo.html">TLMMyo</a> is attached, this method needs to be called again in order to pair with another <a class="el" href="interface_t_l_m_myo.html">TLMMyo</a>. If the myoConnectionAllowance has been reached when this method is called, nothing happens. If another attaching method has been invoked, nothing happens. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="interface_t_l_m_hub.html#af5f3c633a027f9aff62b2c96d730be3a">myoConnectionAllowance</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ad48f9948be7fc01e3250931d20e8de9c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) detachFromMyo: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="interface_t_l_m_myo.html">TLMMyo</a> *)&#160;</td>
          <td class="paramname"><em>myo</em></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Disconnects from the Myo, and stops trying to connect to it. </p>

</div>
</div>
<a class="anchor" id="a82e3b69a3fcf803d84417f2b8a46ffff"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (NSArray *) myoDevices </td>
          <td></td>
          <td class="paramname"></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>A snapshot of the list of TLMMyos currently connected to <a class="el" href="interface_t_l_m_hub.html">TLMHub</a>. </p>
<dl class="section return"><dt>Returns</dt><dd>NSArray containing the connected TLMMyos. </dd></dl>

</div>
</div>
<a class="anchor" id="a34274c550fa0b5f8d64fbc36df657b1b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (instancetype) sharedHub </td>
          <td></td>
          <td class="paramname"></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Singleton accessor. </p>
<dl class="section return"><dt>Returns</dt><dd>The shared instance of the <a class="el" href="interface_t_l_m_hub.html">TLMHub</a> class. </dd></dl>

</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="afc3ed0a2a752ac37beafb2720591c64d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">- (NSString*) applicationIdentifier</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span><span class="mlabel">write</span><span class="mlabel">nonatomic</span><span class="mlabel">assign</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The applicationIdentifier must follow a reverse domain name format (ex. com.domainname.appname). Application identifiers can be formed from the set of alphanumeric ASCII characters (a-z, A-Z, 0-9). The hyphen (-) and underscore (_) characters are permitted if they are not adjacent to a period (.) character (i.e. not at the start or end of each segment), but are not permitted in the top-level domain. Application identifiers must have three or more segments. For example, if a company's domain is example.com and the application is named hello-world, one could use "com.example.hello-world" as a valid application identifier. applicationIdentifier can be an empty string. </p>

</div>
</div>
<a class="anchor" id="a0bdc4dd729fb7d12d6625baeb4d2787a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="el" href="interface_t_l_m_hub.html#a28258d40419feadc53030e841bfbb06a">TLMLockingPolicy</a>) lockingPolicy</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span><span class="mlabel">write</span><span class="mlabel">nonatomic</span><span class="mlabel">assign</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The locking policy enforced by this <a class="el" href="interface_t_l_m_hub.html">TLMHub</a>. Defaults to TLMLockingPolicyStandard. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="interface_t_l_m_hub.html#a28258d40419feadc53030e841bfbb06a">TLMLockingPolicy</a> </dd></dl>

</div>
</div>
<a class="anchor" id="af5f3c633a027f9aff62b2c96d730be3a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">- (NSUInteger) myoConnectionAllowance</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span><span class="mlabel">write</span><span class="mlabel">nonatomic</span><span class="mlabel">assign</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Controls how many TLMMyos are allowed to connect to your app at once. Default value is 1. Undefined behaviour for myoConnectionAllowance &gt; 2. </p>

</div>
</div>
<a class="anchor" id="a05504d8da60de015b64366d1edc738d8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">- (BOOL) shouldNotifyInBackground</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span><span class="mlabel">write</span><span class="mlabel">nonatomic</span><span class="mlabel">assign</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Determines whether notifications get posted when the app is in the background. Default value is NO. </p>

</div>
</div>
<a class="anchor" id="a1c2b081ff4a8c9211c9f26fc58a478df"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">- (BOOL) shouldSendUsageData</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span><span class="mlabel">write</span><span class="mlabel">nonatomic</span><span class="mlabel">assign</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set whether Myo usage data should be sent to Thalmic Labs. Default value is YES. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_t_l_m_hub_8h_source.html">TLMHub.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="interface_t_l_m_hub.html">TLMHub</a></li>
    <li class="footer">Copyright &copy; 2013 Thalmic Labs Inc. Confidential and not for redistribution. See LICENSE.txt.</li>
  </ul>
</div>
</body>
</html>
